<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html 	xmlns="http://www.w3.org/1999/xhtml"  
    	xmlns:h="http://java.sun.com/jsf/html"  
    	xmlns:f="http://java.sun.com/jsf/core"  
    	xmlns:p="http://primefaces.org/ui"
    	xmlns:ui="http://java.sun.com/jsf/facelets"
      	xmlns:a4j="http://richfaces.org/a4j"> 
<h:head></h:head> 
<body> 
	<h:form>
		<p:panel header="Dati">
			<h:panelGrid columns="3" id="regGrid">
				<h:outputLabel for="username">*Username:</h:outputLabel>
				<p:inputText id="username" value="#{registerBean.impiegatoDTO.username}" />
				<p:message for="username" />

				<h:outputLabel for="Nome">*Nome:</h:outputLabel>
				<p:inputText id="Nome" value="#{registerBean.impiegatoDTO.nome}" />
				<p:message for="Nome" />

				<h:outputLabel for="Cognome">*Cognome:</h:outputLabel>
				<p:inputText id="Cognome" value="#{registerBean.impiegatoDTO.cognome}"/>
				<p:message for="Cognome" />
				
				<h:outputLabel for="Email">*Email:</h:outputLabel>
				<p:inputText id="Email" value="#{registerBean.impiegatoDTO.email}"/>
				<p:message for="Email" />
				
				<h:outputLabel for="Telefono"> Telefono:</h:outputLabel>
				<p:inputText id="Telefono" value="#{registerBean.impiegatoDTO.telefono}"/>
				<p:message for="Telefono" />
				
				<h:outputLabel for="Città"> Città:</h:outputLabel>
				<p:inputText id="Città" value="#{registerBean.impiegatoDTO.citta}"/>
				<br/>

				<h:outputLabel for="password">*Password:</h:outputLabel>
				<p:password id="password" value="#{registerBean.impiegatoDTO.password}" 
					feedback="true" match="pwd2" label="Password"/>
				<p:message for="password" />

				<h:outputLabel for="pwd2">*Conferma Password:</h:outputLabel>
				<p:password id="pwd2" label="Conferma Password" 
					value="#{registerBean.impiegatoDTO.password}"/>
			</h:panelGrid>
			
			<p:commandButton value="Registra" update="regGrid" 
				action="#{registerBean.registrazioneImpiegato()}"/>

		</p:panel>
	</h:form>
</body> 
</html>
